Read<TState>(ComponentReader<T, TState>, TState)

Method

Namespace: Ignis

Declared in: Ignis.IComponentCollection<T>


Iterates over each 'entity ID'-'component' pair using the supplied callback, passing component data by reference (without copying). Passes an additional parameter to the callback which can be used to avoid heap allocations by passing the required variables through it.

Syntax

public void Read<TState>(
	ComponentReader<T, TState> action,
	TState state
)

Parameters

action

Callback to be called on each pair


Back to index